The use of contiguous physical memory (that is, memory that comprises real (physical) addresses that are consecutive) is becoming increasingly infrequent in kernel architecture for computer systems. Kernel architects assume that hardware supports scatter-gather I/O, which is often correct.
However, many older hardware components do not support scatter-gather I/O, and some newer hardware components also do not support scatter-gather I/O. Various newer hardware device components do not support scatter-gather I/O for their buffer descriptor rings. One example is the Gigabit Ethernet/PCI network interface card, Tigon 2 ASIC, version 5 or 6, SX fibre connector IBM FRU 07L8918 produced by Alteon Websytems Inc (acquired by Nortel networks) of San Jose, Calif.
Operating systems provide APIs (application program interfaces) for kernel programming. In particular, operating systems provide APIs to allocate memory in the kernel virtual address space. An example is xmalloc ( ) provided by the AIX™ operating system. This API provides no guarantee that the physical memory allocated as a result of this API is contiguous.
Some operating systems provide APIs to allocate memory in the virtual address space with a guarantee that the physical memory is contiguous. An example is rmalloc ( ) in the AIX™ operating system. Memory allocated as a result of this command is pinned but not pageable. Use of APIs that provide contiguous physical memory (for example, rmalloc ( ) as noted directly above) is limited. Programmers writing kernel extensions, device drivers and other modules are generally not permitted to use APIs such as rmalloc ( ). Such APIs are generally used only by firmware programmers in certain circumstances. In this respect, the free pool of memory available using rmalloc ( ) is 16 MB and is fully used by firmware in most systems that use the AIX™ operating system, such as the IBM RS/6000 series systems.
For application (that is, user-mode) programming, standard APIs provided for memory allocation are malloc ( ) and realloc ( ). In both cases, the contiguity of the underlying physical memory is not guaranteed. Consequently, these calls are not suitable for use in cases in which contiguous physical memory is required.
In view of the above observations, a need clearly exists for an improved manner of allocating contiguous physical memory.